import request from '@/utils/request'

export function getList(params) {
  return request({
    url: '/party/getPartyList',
    method: 'get',
    params
  })
}

export function getFoodStallItemList(params) {
  return request({
    url: '/activity/getFoodStallItemList',
    method: 'get',
    params
  })
}

export function getFoodStallUserList(params) {
  return request({
    url: '/activity/getFoodStallUserList',
    method: 'get',
    params
  })
}

export function updateAstra(data){
  return request({
    url: '/activity/updateAstra',
    method: 'put',
    data
  })
}

export function getAstraNumber(){
  return request({
    url: '/activity/getAstraNumber',
    method: 'get',
  })
}
export function getLastAstraNumber(){
  return request({
    url: '/activity/getLastAstraNumber',
    method: 'get',
  })
}

export function getActivityList(params) {
  return request({
    url: '/activity/getActivityList',
    method: 'get',
    params
  })
}


export function updateParty(data) {
  return request({
    url: '/party/updateParty',
    method: 'put',
    data
  })
}

export function getUserList(params) {
  return request({
    url: '/party/getSigningList',
    method: 'get',
    params
  })
}

export function getSigningListByAssociationId(params) {
  return request({
    url: '/party/getSigningListByAssociationId',
    method: 'get',
    params
  })
}

export function getLotteryProbability(params) {
  return request({
    url: '/party/getLotteryProbability',
    method: 'get',
    params
  })
}

export function getLotteryItemList(params) {
  return request({
    url: '/gift/getLotteryItemList',
    method: 'get',
    params
  })
}

export function getLotteryList(params) {
  return request({
    url: '/gift/getLotteryList',
    method: 'get',
    params
  })
}

export function updateAstraMoney(params) {
  return request({
    url: '/gift/updateAdAstraMoney',
    method: 'get',
    params
  })
}

export function updateAstraRebateRatio(params){
  return request({
    url: '/gift/updateAdAstraMoneyProbability',
    method: 'get',
    params
  })
}

export function giveLotteryGift(data){
  return request({
    url: '/gift/giveLotteryGift',
    method: 'post',
    data
  })
}


export function getCurrentLottery() {
  return request({
    url: '/gift/getCurrentLottery',
    method: 'get'
  })
}

export function setRole(data) {
  return request({
    url: '/party/setRole',
    method: 'put',
    data
  })
}

export function addGift(data) {
  return request({
    url: '/party/addGift',
    method: 'post',
    data
  })
}

export function deleteById(id) {
  return request({
    url: `/party/deletePartyById/${id}`,
    method: 'delete'
  })
}

export function verifyUserSkill(params) {
  return request({
    url: `/userSkill/verifyUserSkill`,
    method: 'put',
    params
  })
}
